<?php

class myUser extends sfGuardSecurityUser {
  public function getNombreUsuario() {
    if ($this->isAuthenticated())
      return $this->getGuardUser()->getUsername();
    else
      return 0;
  }

  public function getIdUsuario() {
    if ($this->isAuthenticated())
      return $this->getGuardUser()->getId();
    else
      return 0;
  }

  public function getGrupo() {
    $grupos = $this->getGroupNames();
    if ($this->isAuthenticated())
      foreach ($grupos as $grupo) {
        return $grupo;
      }
    else
      return 0;
  }
}
